package com.apes.fn.tms.repository;


import com.apes.fn.tms.model.BranchLine;
import com.apes.fn.tms.model.CarInformation;
import com.apes.fn.tms.model.Waybill;
import com.apes.fn.tms.model.WaybillPlanningPlan;
import com.apes.framework.jpa.repository.CustomRepository;

import java.util.List;

public interface WaybillPlanningPlanRepository extends CustomRepository<WaybillPlanningPlan, String> {

    List<WaybillPlanningPlan> findByWaybillId(Waybill waybill);
    List<WaybillPlanningPlan> findByCarInformationId(CarInformation carInformation);

    List<WaybillPlanningPlan> findByWaybillIdAndLineId(Waybill waybill, BranchLine line);
    WaybillPlanningPlan findByWaybillIdAndPlanNumberAndExecutionNumber(Waybill waybillId, int planNumber , int executionNumber);

    List<WaybillPlanningPlan> findByWaybillIdAndStatus(Waybill waybill,String status);


    List<WaybillPlanningPlan> findByCarInformationIdAndStatus(CarInformation carInformation, String status);
}
